<div class="container_8 clearfix">                
	<!-- Main Section -->
	<section class="main-section grid_8">
		<!-- Forms Section -->
		<div class="main-content grid_8 alpha">
			<header>
				<ul class="action-buttons clearfix fr">
					<li><a href="<?php echo $this->url->action("index")?>" class="modalInput" rel="#simpledialog">Danh mục sản phẩm</a></li>
				</ul>
				<h2>Cập nhật thông tin slide</h2>
			</header>
			<section class="clearfix">
				<?php echo $this->html->beginForm("edit",array('class'=>"form"))?>
					<?php $this->html->hiddenFor('id');?>
					<div class="clearfix">
						<?php $this->html->labelFor("homepage") ?>
						<?php $this->html->checkboxFor("homepage") ?>
					</div>
					<div class="clearfix">
						<?php $this->html->labelFor("name") ?>
						<?php $this->html->textboxFor("name") ?>
						<?php $this->html->validationMessageFor("name")?>
					</div>
					<div class="clearfix">
						<?php $this->html->labelFor("position") ?>
						<?php $this->html->textboxFor("position") ?>
						<?php $this->html->validationMessageFor("position")?>
					</div>
					<div class="clearfix">
      					<?php $this->html->labelFor("image") ?>
      					<?php $this->html->textboxFor("image") ?>
      					<button class="button button-gray" type="button" onclick="openGallery('image');">Duyệt</button>
     					<?php $this->html->validationMessageFor("image")?>
     				</div>
					<div class="action clearfix">
						<button class="button button-gray" type="submit"><span class="accept"></span>Cập nhật</button>
						<button class="button button-gray" type="reset">Làm lại</button>
					</div>
				<?php echo $this->html->endForm();?>
			</section>
		</div>
		<!-- End Forms Section -->
		<div class="clear"></div>
	</section>
    <!-- Main Section End -->
</div>
<script type="text/javascript" src="<?php echo $this->url->content("library/tiny_mce/plugins/imagemanager/js/mcimagemanager.js") ?>"></script>
<script type="text/javascript">
 function openGallery(ele){
  mcImageManager.open('edit', ele);
 }
 function selectImage(){
  if($("#imageselect").val() == "")
  {
   alert("Bạn hãy điền đường dẫn ảnh !");
   return false;
  }
  if($("#subimages").val() == "")
   $("#subimages").val($("#imageselect").val());
  else
   $("#subimages").val($("#subimages").val() + ",\n" + $("#imageselect").val());
 }
</script>